﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using MVVM_CAD.Common;
using MVVM_CAD.ViewModel;

namespace MVVM_CAD
{
	/// <summary>
	/// Interaction logic for CanvasView.xaml
	/// </summary>
	public partial class CanvasView : UserControl
	{
	    private MainViewModel vm;
		
        public CanvasView()
		{
			this.InitializeComponent();
		    vm = (MainViewModel) DataContext;
		}

        private void cnvPrincipalCanvas_Loaded(object sender, RoutedEventArgs e)
        {
            vm.Canvas = (DrawingCanvas)sender;
        }
	}
}